:root{
    padding: 0;
    margin: 0;
}

a:link {
    color: red
}

a:visited {
    color: green
}

a:hover {
    color: blue
}

a:active {
    color: yellow
}

input:focus {
    background: green;
}

input:hover {
    background: blue;
}

input:active {
    background: yellow;
}

section {
	height: 900px;
}

section:target {
	color: red;
}

:empty{
    border: 1px solid #333;
}

article span:first-child{
    /* 这里选取的是孩子元素 且第一个为 span*/
    color: red;
}

article span:first-of-type{
    /* 这里选取的是 span作为article的第一个类型的元素 */
    color: red;
}

article span:only-of-type{
    color: violet;
}

article span:nth-last-of-type(1){
    color: yellowgreen;
}

table tr>td:nth-child(even) {
    background: green;
    color: white;
}

ul li:not(:nth-child(1)) {
    background: red;
}

input:enabled {
    background: red;
}

input:disabled {
    background: #dddddd;
}

input:required {
    border: solid 2px blue;
}

input:optional {
	background: #dcdcdc; 
	border: none;
}

input:valid {
    border: solid 1px green;
}

input:invalid {
    border: solid 1px red;
}